<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Like
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: Global.php 2010-09-07 16:05 idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Like
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 */

class Like_Form_Admin_Global extends Engine_Form
{
  public function init()
  {
    $this
      ->setTitle('like_Like Plugin Settings')
      ->setDescription('like_FAN_FORM_ADMIN_GLOBAL_DESCRIPTION');

    $module_path = Engine_Api::_()->getModuleBootstrap('like')->getModulePath();
    $this->addPrefixPath('Engine_Form_Decorator_', $module_path . '/Form/Decorator/', 'decorator');

    $settings = Engine_Api::_()->getApi('settings', 'core');

    $this->addElement('Radio', 'like_profile_enabled', array(
      'label' => 'like_Profile Like Clubs',
      'description' => 'like_LIKE_FORM_ADMIN_GLOBAL_PROFILE_DESCRIPTION',
    	'multiOptions' => array(
    		0 => 'like_No, members can not create profile like clubs.',
    		1 => 'like_Yes, members can create profile like clubs.'
    	),
      'value' => $settings->getSetting('like.profile.enabled', 1)
    )); 

    $this->addElement('Text', 'like_profile_count', array(
      'label' => 'like_Count of profile likes',
      'value' => $settings->getSetting('like.profile_count', 9)
    ));

    $this->addElement('Text', 'like_likes_count', array(
      'label' => 'like_Count of likes',
      'value' => $settings->getSetting('like.likes_count', 9)
    ));

    $this->addElement('File', 'logo', array(
      'label' => 'like_Pictures for Like Button and Like Box'
    ));
    $this->logo->addValidator('Extension', false, 'jpg,png,gif');
    $this->logo->addDecorator('LikeLogo', array());

    // Add submit button
    $this->addElement('Button', 'submit', array(
      'label' => 'Save Changes',
      'type' => 'submit',
      'ignore' => true
    ));
  }
}